package com.itheima.io.filewriter.demo01;

import java.io.FileWriter;
import java.io.IOException;

public class FileWriterDemo01 {

    public static void main(String[] args) throws IOException {

        FileWriter fileWriter = new FileWriter("itheima-io-filewriter\\a.txt");

//        for (int i = 0; i < 10; i++) {
//            fileWriter.write("蓝忘机----" + i);
//            fileWriter.write("\r\n");
//            fileWriter.flush();
//        }

        for (int i = 0; i < 10; i++) {
            fileWriter.write("蓝忘机----" + i + "\r\n");//调用一次方法，整体算一个字符串
        }



        fileWriter.close();

    }

}
